<div class="ev-formulario">
    <div class="ev-title-page">
        <h1>Papel</h1>
    </div>

    <?php if ($this->row->id_papel) : ?>
    <div class="ev-option-buttons">
        <ul>
            <li>
                <a class="ui-state-default ui-corner-all" href="<?php echo $this->baseUrl(); ?>/corporativo/papel/documento/id_papel/<?php echo $this->row->id_papel ?>/html/true" target="_blank">
                    <span class="ui-icon ui-icon-suitcase"></span>
                    Gerar Documento
                </a>
            </li>
        </ul>
    </div>
    <?php endif; ?>

    <form action="<?php echo $this->baseUrl(); ?>/corporativo/papel/gravar" method="post" name="formulario" id="formulario">
        <input type="hidden" name="id_papel" id="id_papel" value="<?php echo $this->row->id_papel ?>" />
        <fieldset>
            <div class="ev-campo">
                <label for="fk_departamento"><?php echo $this->translate( "fk_departamento"); ?>&nbsp;<span class="campoObrigatorio">*</span>: </label>
                <?php echo $this->formSelect( "fk_departamento", $this->row->fk_departamento, array( "id" => "fk_departamento", "title" => $this->translate("fk_departamento"), "class" => "required"), $this->aReferencias["fk_departamento"] ); ?>
            </div>

            <div class="ev-campo">
                <label for="fk_usuario_responsavel"><?php echo $this->translate( "fk_usuario_responsavel"); ?>&nbsp;<span class="campoObrigatorio">*</span>: </label>
                <?php echo $this->formSelect( "fk_usuario_responsavel", $this->row->fk_usuario_responsavel, array( "id" => "fk_usuario_responsavel", "title" => $this->translate("fk_usuario_responsavel"), "class" => "required"), $this->aReferencias["fk_usuario_responsavel"] ); ?>
            </div>

            <div class="ev-campo">
                <label for="fk_papel_imediato"><?php echo $this->translate( "fk_papel_imediato"); ?>: </label>
                <?php echo $this->formSelect( "fk_papel_imediato", $this->row->fk_papel_imediato, array( "id" => "fk_papel_imediato", "title" => $this->translate("fk_papel_imediato")), $this->aReferencias["fk_papel_imediato"] ); ?>
            </div>

            <div class="ev-campo">
                <label for="st_codigo"><?php echo $this->translate( "st_codigo"); ?>&nbsp;<span class="campoObrigatorio">*</span>: </label>
                <input class="text ui-widget-content ui-corner-all required" type="text" name="st_codigo" id="st_codigo" value="<?php echo $this->row->st_codigo; ?>" title="<?php echo $this->translate( "st_codigo"); ?>"  maxlength="10" />
            </div>

            <div class="ev-campo">
                <label for="st_nome"><?php echo $this->translate( "st_nome"); ?>&nbsp;<span class="campoObrigatorio">*</span>: </label>
                <input class="text ui-widget-content ui-corner-all required" type="text" name="st_nome" id="st_nome" value="<?php echo $this->row->st_nome; ?>" title="<?php echo $this->translate( "st_nome"); ?>"  maxlength="45" />
            </div>

            <div class="ev-campo">
                <label for="st_missao"><?php echo $this->translate( "st_missao"); ?>&nbsp;<span class="campoObrigatorio">*</span>: </label>
                <textarea class="text ui-widget-content ui-corner-all required" rows="10" cols="80" name="st_missao" id="st_missao" title="<?php echo $this->translate( "st_missao"); ?>" ><?php echo $this->row->st_missao ?></textarea>
            </div>

            <div class="ev-campo">
                <label for="dt_cadastro"><?php echo $this->translate( "dt_cadastro"); ?>&nbsp;<span class="campoObrigatorio">*</span>: </label>
                <?php echo $this->dateFormat($this->row->dt_cadastro); ?>
            </div>
        </fieldset>
<?php if ($this->row->id_papel) : ?>
    <div class="accordion">
        <?php echo $this->action('atividades', 'papel', 'corporativo', array('id_papel' => $this->row->id_papel)); ?>
    </div>
<?php endif; ?>
        <div class="botoesAcao">
            <button type="submit" name="botao-salvar" id="botao-salvar">Salvar</button>
            <button type="button" name="botao-cancelar" id="botao-cancelar" action="<?php echo $this->baseUrl() ?>//papel">Cancelar</button>
        </div>
    </form>
</div>
<script type="text/javascript">
    $().ready(function() {
        $("form").validate({ignoreTitle: true});
    });
</script>
